package com.lazy.controller;

import com.lazy.entity.User;
import com.lazy.service.UserService;
import com.lazy.utils.RespBean;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("user")
public class UserController {
    @Resource
    private UserService userService;

    @PostMapping("/login")
    public RespBean login(@RequestBody User user, HttpServletRequest request) {
        return userService.login(user,request);
    }
}

